#!/usr/bin/env python  
# -*- coding: utf-8 -*-  
from email.mime.text import MIMEText
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from smtplib import SMTP
from os.path import join as pjoin
import sys,re,urllib2,urllib,time,os,json,codecs,csv,smtplib

type = sys.getfilesystemencoding() 
reload(sys)  
sys.setdefaultencoding('utf8')

def load_file():  
    # 获取当前文件路径  
    current_path = os.path.abspath(__file__)  
    # 获取当前文件的父目录  
    father_path = os.path.abspath(os.path.dirname(current_path) + os.path.sep + ".")  
    # config.ini文件路径,获取当前目录的父目录的父目录与congig.ini拼接  
    config_file_path=os.path.join(os.path.abspath(os.path.dirname(current_path) + os.path.sep + ".."),'config.ini')  
    print(u'当前目录:' + current_path)  
    print(u'当前父目录:' + father_path)  
    print(u'config.ini路径:' + config_file_path)  
  
  
load_file() 